import request from "@/utils/request";

//请求数据
/**
 *  卫星信息相关
 */
//最近项目
export function getRecentProgram() {
  return request({
    url: "/api/v1/data/rencentprogram",
    method: "get",
  });
}
//卫星数据信息
export function getTableInfo() {
  return request({
    url: "/api/v1/data/datainfo",
    method: "get",
  });
}

/**
 *  任务相关
 */
//任务列表
export function getTaskList() {
  return request({
    url: "/api/v1/data/selectalltask",
    method: "post",
  });
}
//创建任务
export function newTask(task: string, description: string) {
  return request({
    url: "/api/v1/data/createtask",
    method: "post",
    data: {
      taskName: task,
      description: description,
    },
  });
}
//删除任务
export function deletetask(id: any) {
  return request({
    url: "/api/v1/data/deleteTaskByTaskId",
    method: "post",
    data: {
      taskId: id,
    },
  });
}
